/**
 *
 * Copyright Pact Lab of H.I.T.
 *
 * Designed and Implemented by Grid Researching Group, 
 * Pact Lab, Harbin
 * 
 * This Project is part of the national 973 Project:
 * Internet Based Virtual Computing Environment
 *
 * http://pact518.hit.edu.cn
 * 
 * Author:       Meteor <meteorlxk@gmail.com> 
 * Copyright:    pact518 
 * Version:      1.0
 * Created:      2009-4-6 
 * LastModified: 2009-4-6
 */
package edu.hit.pact.pgse.bean;

import java.io.Serializable;
import java.util.Collection;

/**
 * @author Meteor
 *
 */
public class Task implements Serializable{

	private static final long serialVersionUID = 979832182076639195L;
	
	private Collection<TaskPiece> pieces;

	public Task(Collection<TaskPiece> pieces) {
		super();
		this.pieces = pieces;
	}


	public Collection<TaskPiece> getPieces() {
		return pieces;
	}
	
	/*
	 * (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		StringBuffer buffer = new StringBuffer();
		buffer.append("--------------------------------------------\n");
		if (pieces != null) {
			buffer.append("pieces : \n");
			for (TaskPiece piece : pieces) {
				buffer.append(piece.toString());
			}//end for			
		}//end if
		buffer.append("--------------------------------------------\n");
		return buffer.toString();
	}
}
